<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Block</title>
</head>

<body>
<?php
include("../connection/connection.php");
include("reportFunctions.php");
$distId=$_REQUEST['distId'];
?>

<table border="0" width="521" cellspacing="0" cellpadding="0">
	<tr>
		<td width="521" height="26" bgcolor="#E9E9E9">
		<p align="center"><span style="font-size: 9pt; font-weight: 700">
	  <font face="Verdana" color="#224568">Coverage of villages by different schemes</font></span></td>
	</tr>
	
	<tr>
		<td bgcolor="#E9E9E9" height="56">
		<table border="1" width="520" cellspacing="0" cellpadding="0" height="61" bgcolor="#C5D8EB">
			<tr>
				
				<td width="200" align="center">
				<font face="Verdana" style="font-size: 8.5pt"><b>Type of Schemes</b></font></td>
				
				<td width="314" align="center">
				<p align="center"><font face="Verdana" style="font-size: 8.5pt">
			  <b>Villages Covered (No.)</b></font></td>
			</tr>
			
		</table>		</td>
	</tr>
	<tr>
		<td>
		<table border="1" width="520" cellspacing="0" cellpadding="0" height="49" bordercolor="#C5D8EB" style="border: 1px solid #BBD1E8" bgcolor="#F9F9F9">
			<tr>
				
				<td width="200" align="center"><font face="Verdana" style="font-size: 8.5pt">HP</font></td>
				
				<td width="314" align="center"><font face="Verdana" style="font-size: 8.5pt"><?php echo $hp=getSchemeNoDistWise($distId,'HP'); ?></font></td>
			</tr>
			
			
			<tr>
				
				<td width="200" align="center"><font face="Verdana" style="font-size: 8.5pt">P&amp;T </font></td>
				
				<td width="314" align="center"><font face="Verdana" style="font-size: 8.5pt"><?php echo $pnt=getSchemeNoDistWise($distId,'P&T'); ?></font></td>
			</tr>
			<tr>
				
				<td width="200" align="center"><font face="Verdana" style="font-size: 8.5pt">Piped</font></td>
				
				<td width="314" align="center"><font face="Verdana" style="font-size: 8.5pt"><?php echo $piped=getSchemeNoDistWise($distId,'piped'); ?></font></td>
			</tr>
			<tr>
				
				<td width="200" align="center"><font face="Verdana" style="font-size: 8.5pt">Sanitary Diggs</font></td>
				
				<td width="314" align="center"><font face="Verdana" style="font-size: 8.5pt"><?php echo $sandigg=getSchemeNoDistWise($distId,'Sanitary Diggs'); ?></font></td>
			</tr>
			
			
			<tr>
				
				<td width="200" align="center"><font face="Verdana" style="font-size: 8.5pt">TSS(P&amp;T)</font></td>
				
				<td width="314" align="center"><font face="Verdana" style="font-size: 8.5pt"><?php echo $tss=getSchemeNoDistWise($distId,'TSS(P&T)'); ?></font></td>
			</tr>
			<tr>
				<?php 
				$sqlrwss="select village_id from tbl_dtls_q1_main where type_scheme='RWSS' and district_id='".$distId."'";
				$query=mysql_query($sqlrwss);
				$countrwss=0;
				while($data=mysql_fetch_array($query))
				{
				$rwss=explode(',',$data['village_id']);
				$countrwss+=count($rwss);
				}
				?>
				<td width="200" align="center"><font face="Verdana" style="font-size: 8.5pt">Regional WSS</font></td>
				
				<td width="314" align="center"><font face="Verdana" style="font-size: 8.5pt"><?php echo $countrwss;//echo getSchemeNoBlockWise($distId,'WSS'); ?></font></td>
			</tr>
			
			<?php
			//$piped=getSchemeNoDistWise($distId,'piped');
			//$pt=getSchemeNoDistWise($distId,'P&T');
			//$hp=getSchemeNoDistWise($distId,'HP');
			//$tss=getSchemeNoDistWise($distId,'TSS(P&T)');
			$totalschemes=$hp+$pnt+$piped+$sandigg+$tss+$countrwss;
			//$totalschemes+=$pnt;
			//$totalschemes+=$piped;
			//$totalschemes+=$tss;
			?>
			<tr>
				
				<td width="200" align="center" bgcolor="#E9E9E9">
				<font style="font-size: 8.5pt" face="Verdana"><b>Total</b></font></td>
				
				<td width="314" align="center" bgcolor="#E9E9E9"><font face="Verdana" style="font-size: 8.5pt"><b><?php echo $totalschemes;?></b></font></td>
			</tr>
		</table>		</td>
	</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>


</body>

</html>